﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace GenericModels
{
    [KnownType(typeof(DateTime))]
    [KnownType(typeof(ShowRoom))]
    [KnownType(typeof(ShowType))]
    [KnownType(typeof(List<Price>))]
    [DataContract (IsReference=false)]
    public class Show
    {
        private DateTime date;
        private ShowRoom room;
        private ShowType type;
        private List<Price> prices;
        private int show_Id;
        private string imageDir;

        //constructor
        public Show()
        {
            this.date = DateTime.Now;
            this.room = null;
            this.type = null;
            this.show_Id = 0;
            this.prices = new List<Price>();
            this.imageDir = "";
        }

        //Also temp constructor
        public Show(ShowRoom room, ShowType type,
                    List<Price> prices, int show_Id, string imageDir)
        {
            this.room = room;
            this.type = type;
            this.prices = prices;
            this.show_Id = show_Id;
            this.imageDir = imageDir;
        }

        //constructor
        public Show(DateTime date, ShowRoom room, ShowType type,
                    List<Price> prices, int show_Id, string imageDir)
        {
            this.date = date;
            this.room = room;
            this.type = type;
            this.prices = prices;
            this.show_Id = show_Id;
            this.imageDir = imageDir;
        }

        #region Getters and Setters
        [DataMember]
        public DateTime Date 
        {
            get { return date; }
            set { date = value; }
        }

        [DataMember]
        public ShowRoom Room
        {
            get { return room; }
            set { room = value; }
        }

        [DataMember]
        public ShowType Type
        {
            get { return type; }
            set { type = value; }
        }

        [DataMember]
        public List<Price> Prices
        {
            get { return prices; }
            set { prices = value; }
        }

        [DataMember]
        public int Show_Id
        {
            get { return show_Id; }
            set { show_Id = value; }
        }
        [DataMember]
        public string ImageDir
        {
            get { return imageDir; }
            set { imageDir = value; }
        }
        #endregion
    }
}
